/**
 * 项目配置文件
 * @author 杨世峰
 */

'use strict'
const path = require('path')

function resolve(dir) {
    return path.join(__dirname, dir)
}

const name = "自家用英语学习平台"

module.exports = {
    publicPath: "/", //用法和webpack本身的output.publickPath用法一致
    configureWebpack: {
        name: name,
        resolve: {
            alias: {
                '@': resolve('src')
            }
        }
    },
    devServer: {
        proxy: {
            // detail: https://cli.vuejs.org/config/#devserver-proxy
            '/api': {
                // target: `http://localhost:8081/v1`,
                target: `http://192.168.3.9:8080/v1`,
                changeOrigin: true,
                pathRewrite: {
                    '^/api': ''
                }
            }
        },
        disableHostCheck: true
    },
}